[IA64] user process should not crash Xen.
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Thu, 9 Mar 2006 23:16:20 +0000 (16:16 -0700)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Thu, 9 Mar 2006 23:16:20 +0000 (16:16 -0700)
Iip can't be used to check if domain is inside Xen because IIP is a user
register.  CPL must be used instead.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
xen/arch/ia64/xen/process.c

index f83468b9367b6e1d7cf0bfeafa1dd91e11bc3d84..e7846154e48d604e84c5f868db1d57030ccc8591 100644 (file)
@@ -286,7 +286,8 @@ void ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_reg
                vcpu_itc_no_srlz(current,is_data?2:1,address,pteval,-1UL,(itir>>2)&0x3f);
                return;
        }
-       if (IS_VMM_ADDRESS(iip)) {
+       if (!user_mode (regs)) {
+               /* The fault occurs inside Xen.  */
                if (!ia64_done_with_exception(regs)) {
                        // should never happen.  If it does, region 0 addr may
                        // indicate a bad xen pointer